﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for TAMoreDetailChartisDB
/// </summary>
/// 
namespace CE.TravelInsurance
{
    public class TAMoreDetailChartisDB
    {
        public TAMoreDetailChartisDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(TAMoreDetailChartis tamoredetailliberty)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocTAMoreDetailInsertUpdateSingleItemChartis]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@CETAMoreDetailId", tamoredetailliberty.cetaMoreDetailId);
            _sPara.Add("@CETAID", tamoredetailliberty.cetaId);
            _sPara.Add("@ProviderCompanyId", tamoredetailliberty.ProviderCompanyId);
            _sPara.Add("@Name", tamoredetailliberty.Name);
            _sPara.Add("@PostalCode", tamoredetailliberty.PostalCode);
            _sPara.Add("@UnitNo", tamoredetailliberty.UnitNo);
            _sPara.Add("@HomeNo", tamoredetailliberty.HomeNo);
            _sPara.Add("@Address", tamoredetailliberty.Address);
            _sPara.Add("@NRICNo", tamoredetailliberty.NRICNo);
            _sPara.Add("@Nationality", tamoredetailliberty.Nationality);
            _sPara.Add("@MobileNo", tamoredetailliberty.MobileNo);
            _sPara.Add("@HomePhoneNo", tamoredetailliberty.HomePhoneNo);
            _sPara.Add("@OfficePhoneNo", tamoredetailliberty.OfficePhoneNo);
            _sPara.Add("@DOB", tamoredetailliberty.DOB);
            _sPara.Add("@EmailAddress", tamoredetailliberty.EmailAddress);
            _sPara.Add("@PlanName", tamoredetailliberty.PlanName);
            _sPara.Add("@PlanType", tamoredetailliberty.PlanType);
            _sPara.Add("@TripType", tamoredetailliberty.TripType);
            _sPara.Add("@CoverageLevel", tamoredetailliberty.CoverageLevel);
            _sPara.Add("@Country", tamoredetailliberty.Country);
            _sPara.Add("@Area", tamoredetailliberty.Area);
            _sPara.Add("@Duration", tamoredetailliberty.Duration);
            _sPara.Add("@StartDate", tamoredetailliberty.StartDate);
            _sPara.Add("@EndDate", tamoredetailliberty.EndDate);
            _sPara.Add("@ChildAge", tamoredetailliberty.ChildAge);
            _sPara.Add("@AdultAge", tamoredetailliberty.AdultAge);
            _sPara.Add("@NoOfTraveller", tamoredetailliberty.NoOfTraveller);
            _sPara.Add("@TotalPremium", tamoredetailliberty.TotalPremium);
            _sPara.Add("@PamentType", tamoredetailliberty.PamentType);
            _sPara.Add("@BankName", tamoredetailliberty.BankName);
            _sPara.Add("@ChequeNo", tamoredetailliberty.ChequeNo);
            _sPara.Add("@NameoftheCard", tamoredetailliberty.NameoftheCard);
            _sPara.Add("@IssuingBankName", tamoredetailliberty.IssuingBankName);
            _sPara.Add("@CreditCardNo", tamoredetailliberty.CreditCardNo);
            _sPara.Add("@CardExpiryMonth", tamoredetailliberty.CardExpiryMonth);
            _sPara.Add("@CardExpiryYear", tamoredetailliberty.CardExpiryYear);
            _sPara.Add("@CardType", tamoredetailliberty.CardType);
            _sPara.Add("@RefCEUserId", tamoredetailliberty.RefCEUserId);
            _sPara.Add("@ViewedDetailId", tamoredetailliberty.ViewedDetailId);
            _sPara.Add("@Status", tamoredetailliberty.Status);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }
    }
}